//
//  TaskCreationViewController.h
//  MemoryTasks
//
//  Created by Philippe Bouamriou on 12/05/10.
//  Copyright 2010 Philippe Bouamriou. All rights reserved.
//

#import <UIKit/UIKit.h>
@class MemoryTasksAppDelegate;
@class TaskCategory;


#define kNameTextFieldTag    0
#define kCommentTextFieldTag 1

#define kFieldTextNameKey    @"Name"
#define kFieldTextCommentKey @"Comment"

typedef enum {
   NSModeCategoryControllerEdition,
   NSModeCategoryControllerCreation
} NSModeCategoryController;

@interface CategoryEditionViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
   MemoryTasksAppDelegate *appDelegate;
   UINavigationController *navController;
   UIBarButtonItem *doneButton;
   NSMutableDictionary *sections;
   NSArray *sectionNames;
   NSArray *localSectionNames;
   NSModeCategoryController modeCategoryController;
   TaskCategory *categoryToModify;
   TaskCategory *parentCategory;
   

}

@property (nonatomic, strong) UINavigationController *navController;
@property (readonly) NSModeCategoryController modeCategoryController;
@property (nonatomic, strong) TaskCategory* categoryToModify;
@property (nonatomic, strong) TaskCategory* parentCategory;

- (void)doneButtonPressed;
- (void)textFieldValueChanged:(id)sender;
- (void)textFieldDone:(id)sender;

@end
